import React from 'react'
import { Router,browserHistory  } from 'react-router';
import  {AjaxSend,setCookie} from "../../util/util";



class Login extends React.Component{
    constructor(props){
        super(props)
        this.state = {
            data: ['', '', ''],
        };
    }
    componentWillMount(){

        this.getUserInfoData()
    }
    getUserInfoData(){
        var data = {
            _cmd: 'user_common_login',
            mobile:18200702230,
            loginpwd:123456,
			unionid: "",
            sign: ""
        }
        AjaxSend(data, (da) =>  {
           alert('登录成功');
           setCookie('ticket',da.data.ticket)
           window.location.href='/index'
        }, (errors)  => {
            alert(errors);
        })
    }
    componentDidMount() {
    
    }
    componentWillReceiveProps(nextProps){

    }
    render(){

        return (
            <div>
              1
            </div>
        )
    }
}


export default Login

// componentDidMount() {
//
// }
